<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <!-- top main-->
  <tr>
    <td height="31">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td style="background:url(<?=base_url('home')?>images/top_left.gif) no-repeat; width:14px; height:31px;"></td>
            <td style="background-color:#000; height:31px; vertical-align:middle;font-weight:bold;text-align:left;color:#fff;">
                Email Templates Management
            </td>
            <td style="background-color:#000; height:31px; vertical-align:middle;text-align:right;font-weight:bold;">
            
            </td>
            <td style="background:url(<?=base_url('home')?>images/top_right.gif) no-repeat; width:14px; height:31px;"></td>
          </tr>
        </table>
    </td>
  </tr>
  <!-- end top main-->
  <!-- main content-->
  <tr>
    <td style="background:white;">
      <div class="scrollTableContainer" style="height:400px;">
        <?php echo form_open(uri_string()); ?>
		<table border="0" cellspacing="0" cellpadding="0" class="edit" width="98%">
		  <tr align="left" height="30">
				<td width="11" class="bg_top_left">&nbsp;</td>
				<td width="130" class="bg_top"><? if($template_id){?>Edit Email Templates<? } else{?> Add Email Templates<? }?></td>
				<? if($template_id){?>
				<td class="bg_top"><a href="#" onclick="common.del(<?=$template_id?>,'admin/email_templates.email_templates.delete' , '<?=lang("_confirm_delete")?>')" title="Delete this item" style="color:white;text-decoration:none;font-weight:normal;cursor:pointer;"><div class="icon_del"></div></a></td>
				<? } else{?>
				<td class="bg_top">&nbsp;</td>	
				<? }?>
				<td width="11" class="bg_top_right">&nbsp;</td>
		  </tr>
		  <tr>
		    <td></td>
			<td>Subject:</td>
			<td align="left"><input name="subject" type="text" value="<?=set_value('subject', '') ?>" size="40" maxlength="255" /><?=form_error('subject');?></td>
		  </tr>
		  <tr>
		  	<td></td>
			<td>Body:</td>
			<td align="left">{editor}<?=form_error('body');?></td>
		  </tr>		  
		  <tr align="left" height="30">
			<td class="bg_bottom_left">&nbsp;&nbsp;&nbsp;</td>
			<td colspan="2" align="right" class="bg_bottom">
			 <input type="submit" value="Save" class="save_button" />&nbsp;
			<input type="button" value="Cancel" class="cancel_button" onclick="document.location.href = SITE_URL + 'admin/email_templates';" />
			</td>
			<td class="bg_bottom_right">&nbsp;</td>
		   </tr>
		</table>
		</form>
      </div>
    </td>
  </tr>
  <!-- end main content-->
 
  <!-- bottom main -->
  <tr>
    <td height="36">
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
    	  <tr>
            <td style="background:url(<?=base_url('home')?>images/bottom_left.gif) no-repeat; width:14px; height:36px;"><nobr>&nbsp;&nbsp;&nbsp;&nbsp;</nobr></td>
            <td style="background-color:#000; width:99%; height:36px;"></td>
            <td style="background:url(<?=base_url('home')?>images/bottom_right.gif) no-repeat; width:14px; height:36px;"><nobr>&nbsp;&nbsp;&nbsp;&nbsp;</nobr></td>
          </tr>
		</table>
   	</td>
  </tr>
  <!-- end bottom main -->
</table>
